//
//  AboutAppViewControllerr.m
//  Youhuiju
//
//  Created by liuovyue on 16/8/29.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "AboutAppViewControllerr.h"
#import "CellAbout.h"

@interface AboutAppViewControllerr ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic, strong)UILabel *labelTitle;
@property (nonatomic, strong)UIButton *buttonReturn;
@property (nonatomic, strong)UIView *viewBar;
@property (nonatomic, strong)UIButton *buttonSure;
@property (nonatomic, strong)UIView *viewBack;
@property (nonatomic, strong)UITableView *tableAbout;
@end

@implementation AboutAppViewControllerr

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self createNavigationBar];
    
    [self createTableView];
    
    
}

- (void)createNavigationBar{
    
    self.viewBar = [[UIView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 64)];
    self.viewBar.backgroundColor = [UIColor whiteColor];
    [self.view addSubview:self.viewBar];
    
    
    self.labelTitle = [[UILabel alloc]init];
    self.labelTitle.text = @"关于优汇聚";
    self.labelTitle.textAlignment = NSTextAlignmentCenter;
    self.labelTitle.textColor = [UIColor blackColor];
    self.labelTitle.font = [UIFont systemFontOfSize:18*FitW];
    [self.viewBar addSubview:self.labelTitle];
    
    [_labelTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        
        //make.top.equalTo(self.viewBar.mas_top);
        make.left.equalTo(self.viewBar.mas_left).offset(100*FitW);
        make.right.equalTo(self.viewBar.mas_right).offset(-100*FitW);
        make.bottom.equalTo(self.viewBar.mas_bottom).offset(-14*FitH);
        
        
        
    }];
    //返回按钮
    self.buttonReturn = [UIButton buttonWithType:UIButtonTypeCustom];
    [self.buttonReturn setImage:[UIImage imageNamed:@"zfanhuijian"] forState:UIControlStateNormal];
    [self.buttonReturn addTarget:self action:@selector(tuihuiAcion:) forControlEvents:UIControlEventTouchUpInside];
    [self.viewBar addSubview:self.buttonReturn];
    
    [_buttonReturn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.viewBar.mas_left).offset(17*FitW);
        make.width.mas_equalTo(22*FitW);
        make.height.mas_equalTo(22*FitH);
        make.bottom.equalTo(self.viewBar.mas_bottom).offset(-13*FitH);
        
        
        
    }];
    
    
    
    
}

- (void)tuihuiAcion:(UIButton *)button {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)createTableView {
    
    
    self.tableAbout = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height+100*FitH) style:UITableViewStylePlain];
    self.tableAbout.delegate = self;
    self.tableAbout.dataSource = self;
    [self.view addSubview:self.tableAbout];
    [_tableAbout mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.viewBar.mas_bottom);
        make.right.equalTo(self.view.mas_right);
        make.left.equalTo(self.view.mas_left);
        make.bottom.equalTo(self.view.mas_bottom);
        
        
        
    }];
    
    [self.tableAbout registerNib:[UINib nibWithNibName:@"CellAbout" bundle:nil] forCellReuseIdentifier:@"CellAbout"];
    
    
    
}
#pragma mark --tableView delegate
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    CellAbout *cell = [tableView dequeueReusableCellWithIdentifier:@"CellAbout"];
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 667*FitH;
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
